
/*************************************************************************
* Copyright (c) 2008, ShenZhen Coship Electronic Ltd Co.
* All rights reserved.
* 
* File Name:		COSHIPMPEG4Decode.h
* Summary:			interface for the CCOSHIPMPEG4Decode class.
* 
* Current Version:	1.0
* Author(s):
/------------------------------------------------------------------------/
revision			author				reason					date
1.0					Ding Ning			Initialize Version		2008-6-18
/------------------------------------------------------------------------/
*************************************************************************/


#if !defined(AFX_COSHIPMPEG4DECODE_H__96F905E9_54A8_4082_8B66_EA8E6C39C3D3__INCLUDED_)
#define AFX_COSHIPMPEG4DECODE_H__96F905E9_54A8_4082_8B66_EA8E6C39C3D3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ICodec.h"
#include "../inc/DecBuf.h"
#include "../inc/IMMP4.h"

//add by li futang 2007-10-07
class CCOSHIPMPEG4Decode : public ICodec  
{
public:
	CCOSHIPMPEG4Decode();
	virtual ~CCOSHIPMPEG4Decode();
public:
	virtual BOOL Init(const char* pbuf, int len);
	virtual void Destroy();
	virtual int GetWidth() {return m_nWidth;};
	virtual int GetHeight() {return m_nHeight;};
	virtual int GetBPP() {return 24;};
	virtual BOOL Decode(const char* pbuf, int len, int subLen = 0);
	virtual void InitPicInfo();
	virtual char* GetPicBuff(){return (char *)m_pPic;};
	
	void SetMotion(bool set, int sensitivity, int erosion, int dilation);
	void GetMotion(void **pparam);
	//HRESULT 
private:
	MP4HANDLE		m_hMP4;
	DecBuf*			m_pDecBuf;
	int				m_nWidth;
	int				m_nHeight;
	BOOL			m_bInited;
	const PicInfo*	m_pPic;
};
//end

#endif // !defined(AFX_COSHIPMPEG4DECODE_H__96F905E9_54A8_4082_8B66_EA8E6C39C3D3__INCLUDED_)
